package File;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        //File file = new File("D:\\sss\\jsd2407\\demo.txt");
        //File file = new File("D:/sss/jsd2407/demo.txt"); //绝对路径
        //File file = new File("./demo.txt");
        File file = new File("demo.txt");
        System.out.println("文件名："+file.getName());
        System.out.println("文件大小："+file.length());
        System.out.println("是否可读："+file.canRead());
        System.out.println("是否可写："+file.canWrite());
        System.out.println("是否隐藏："+file.isHidden());
    }
}
